import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/Map',
      children: [
        {
          path: '/Map',
          component: () => import('@/views/Map.vue'),
          children: [
            { path: '/Map/Rotate', component: () => import('@/views/MapViews/RotateView.vue') },
            { path: '/Map/Search', component: () => import('@/views/MapViews/SearchView.vue') },
            { path: '/Map/Plot', component: () => import('@/views/MapViews/PlotView.vue') },
            { path: '/Map/City', component: () => import('@/views/MapViews/CityView.vue') },
            { path: '/Map/Bridge', component: () => import('@/views/MapViews/BridgeView.vue') },
            { path: '/Map/Measure/:type', component: () => import('@/views/MapViews/measureView.vue'), },
          ]
        },
      ]
    },
  ],
})

export default router
